home *** CD-ROM | disk | FTP | other *** search
- /*//////////////////////////////////////////////////////////////////////
- Filename: html-tools.js
- Company Name: Computer Associates International, Inc.
- Legal Copyright: Copyright (c) Computer Associates International, Inc.
- Author: Marek Matus (marek.matus@ca.com)
- Product: Tiny Firewall
- Description: javascript code - help functions
- ///////////////////////////////////////////////////////////////////////*/
-
-
- // Visualize or hide given object
- function hideObject( obj, hide )
- {
- if (obj.style != null && obj.style.display != null)
- obj.style.display = hide ? "none" : "inline";
- }
-
- // Visualize or hide given object and all his children
- function setContainerHidden(obj, hide)
- {
- // call setContainerHidden for all children
- for (var i = 0; i < obj.childNodes.length; i++)
- setContainerHidden(obj.childNodes[i], hide);
-
- // if it is possible set this object to hidden
- if (obj.style != null && obj.style.display != null)
- obj.style.display = hide ? "none" : "inline";
- }
-
- // Enables or disables given object and all his children
- function setContainerEnabled(obj, enabled)
- {
- // call setContainerEnabled for all children
- for (var i = 0; i < obj.childNodes.length; i++)
- setContainerEnabled(obj.childNodes[i], enabled);
-
- // if it is possible set this object to enabled
- if (obj.disabled != null)
- {
- obj.disabled = !enabled;
- }
- }
-
- // Returns object with ID 'objId'
- function getObj(objId)
- {
- if (document.getElementById)
- return document.getElementById(objId);
- else if (document.all)
- return document.all[objId];
- else
- return null;
- }
-
- // Returns position of input object in parent's window
- function getWinPosition(obj)
- {
- if (obj.offsetParent)
- {
- var pos = getWinPosition(obj.offsetParent);
- pos.top += obj.offsetTop;
- pos.left += obj.offsetLeft;
-
- return pos;
- }
- else
- {
- var pos = new Object();
- pos.top = obj.offsetTop ? obj.offsetTop : 0;
- pos.left = obj.offsetLeft ? obj.offsetLeft : 0;
-
- return pos;
- }
- }
-
- // menuchange - handles style change when clicking on the menu (draws black rectangle) - moved from users.js
- function menuchange(td,MO)
- {
- if (MO==1)
- td.className = "menuleft_sel";
-
- if (MO==0)
- td.className = "menuleft";
- }
-
- function setFocus( obj )
- {
- // if it is text box then select whole text
- try
- {
- obj.select();
- }
- catch (e)
- {
- }
-
- try
- {
- obj.focus();
- }
- catch (e)
- {
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////
- /////////////// FLOAT MENU FUNCTIONS //////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////////////////
- var visibleMenu = null;
-
- function closeCurrentFloatMenu()
- {
- if ( visibleMenu != null )
- {
- toggleFloatMenu(visibleMenu.callObj, visibleMenu.menuId);
- }
- }
-
-
- // Shows or hides (if it is already shown) flow menu
- function toggleFloatMenu(tg, menuId, strTable, strScrollWrapper)
- {
- var action = "hide";
- var menu = getObj(menuId);
- var tmpIFrame = getObj("float_menu_help_frame");
-
- // check the action
- if ((visibleMenu == null) || (visibleMenu.callObj != tg))
- action = "show";
-
- if (action == "show")
- {
- // hide old visibleMenu
- if (visibleMenu)
- {
- visibleMenu.style.display = "none";
- if ( tmpIFrame )
- tmpIFrame.style.display = "none";
- }
-
- // hide old visibleMenu.callObj
- if (visibleMenu && visibleMenu.callObj != null)
- {
- visibleMenu.callObj.style.backgroundColor = "";
- visibleMenu.callObj.style.color = "";
- visibleMenu.callObj = null;
- }
-
- // set new visibleMenu and callObj
- //tg.style.backgroundColor = "blue";
- //tg.style.color = "#c0c0c0";
- visibleMenu = menu;
- visibleMenu.callObj = tg;
- visibleMenu.menuId = menuId;
-
- // check window width
- var winWidth = window.innerWidth ? window.innerWidth + window.scrollLeft : document.body.offsetWidth + document.body.scrollLeft - 20;
-
- // set the position of the menu
- // if table is wrapped with div with scrollbars then correction is needed!
- if ( strScrollWrapper && getObj(strScrollWrapper) )
- {
- menu.style.left = tg.parentNode.offsetLeft + getTablePos(strTable).left - getObj(strScrollWrapper).scrollLeft;
- menu.style.top = tg.parentNode.offsetTop + tg.offsetTop + tg.offsetHeight + getTablePos(strTable).top - getObj(strScrollWrapper).scrollTop;
-
- if ( menu.style.height )
- {
- // adjust top of menu to not show scroll bars. It is possible only if we know height of menu
- if ( (parseInt(menu.style.height) + parseInt(menu.style.top)) > parseInt(document.body.scrollHeight ))
- {
- menu.style.top = tg.parentNode.offsetTop + tg.offsetTop + getTablePos(strTable).top - getObj(strScrollWrapper).scrollTop - parseInt(menu.style.height);
- }
- }
-
- if ( parseInt(menu.style.left) < 0 )
- menu.style.left = 0;
- }
- else
- {
- menu.style.left = tg.parentNode.offsetLeft + getTablePos(strTable).left;
- menu.style.top = tg.parentNode.offsetTop + tg.offsetTop + tg.offsetHeight + getTablePos(strTable).top;
- }
-
- // show the menu
- menu.style.display = "block";
- tg.style.backgroundColor = "#b2b2b2"
-
- // correct X position if the menu is out of the window
- if (menu.offsetLeft + menu.offsetWidth > winWidth)
- menu.style.left = winWidth - menu.offsetWidth;
-
- // show help iframe -> it is needed if float menu is over edit controls
- if ( tmpIFrame )
- {
- tmpIFrame.style.left = menu.style.left;
- tmpIFrame.style.top = menu.style.top;
- tmpIFrame.style.width = menu.offsetWidth + "px";
- tmpIFrame.style.height = menu.offsetHeight + "px";
- tmpIFrame.style.display = "block";
- }
- }
- else
- {
- tg.style.backgroundColor = "";
- //tg.style.color = "";
- visibleMenu.callObj = null;
- visibleMenu = null;
-
- // hide the menu
- menu.style.display = "none";
- if ( tmpIFrame )
- tmpIFrame.style.display = "none";
- }
- }
-
- // Returns position of rules table on the screen
- function getTablePos(strTable)
- {
- // the position is not cached -> get it
- var table = getObj( strTable );
- if (table)
- tablePos = getWinPosition(table);
- else
- alert("no found obj");
-
- return tablePos;
- }
-
- function insertPageTitle(strImg, strTitle, bShowStaticUserText, strTip, bNotShowUsers, bNotLoggedAccess, bNotAddMenu)
- {
- if ( external.CfgRegValueString("design") == 'std_menu' && !bNotAddMenu)
- insertTopMenu();
-
- if ( !bNotLoggedAccess )
- logPageAccess();
-
- if (( external.CfgRegValueString("design") != 'bt_menu') || bNotAddMenu )
- {
- document.write('<table class="hdr_user">');
- document.write('<tr>');
-
- document.write('<th>');
- document.write('<h3 style="display: inline">');
- if ( strImg )
- document.write('<IMG alt="" src="../img/' + strImg + '" border="0" align="absmiddle"> ');
- document.write(strTitle + '</h3>');
-
- if ( strTip )
- {
- document.write('<span style="width: 10px;"></span>');
- document.write('<a href="#" onclick="showhelp()">');
- document.write('<img alt="' + strTip + '" src="../img/help16.gif" border="0" align="absmiddle">');
- document.write('</a>');
- }
- document.write('</th>');
-
- document.write('<td align="right" class="heading_guard">');
-
- if ( external.CfgRegValueString("design") != 'bt_menu')
- {
-
- if ( isUsrSelectVisible() && !bNotShowUsers)
- {
- document.write('<img src="../img/ico-usr.gif" width="33" height="28" border="0" alt="" align="absmiddle">');
- //document.write('<img src="../img/ico-sm-usr.gif" width="16" height="16" border="0" alt="" align="absmiddle">');
-
- if (bShowStaticUserText)
- {
- document.write('<span style="font-size: 12px">');
- document.write(window.external.LoggedUser)
- document.write('</span>');
- }
- else
- document.write(GetUsersHtml());
- }
- }
- document.write('</td>');
- document.write('</tr>');
- document.write('</table>');
- document.write('<br>');
- }
-
- if ( external.CfgRegValueString("design") == 'bt_menu')
- {
- try
- {
- parent.htop.addUserCombo( bShowStaticUserText, bNotShowUsers );
- }
- catch (e)
- {
- }
- }
-
- }
-
- function showhelp(bContent)
- {
- var what = "";
-
- var strLink = ( isProVersion()?
- 'http://www.tinysoftware.com/home/tiny2?pg=resources&book_name=tf2005pro_manual&intro_topic=tf6_pro_ovw' :
- 'http://www.tinysoftware.com/home/tiny2?pg=resources&book_name=tpf2005_manual&intro_topic=tf6std_ovw');
-
- if ( !bContent )
- {
- try
- {
- //what = getContextHelpRef();
- }
- catch (e)
- {
- }
- }
-
- //window.open(window.external.InstallDir + 'help.html' + (what? '#' + what : ''),'help', 'toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=630px, height=600px, topmargin=10px, leftmargin=10px');
- window.open(strLink,'_blank');
- }
-
- /*function showhelp(bContent)
- {
- var what = "";
-
- if ( !bContent )
- {
- try
- {
- what = getContextHelpRef();
- }
- catch (e)
- {
- }
- }
-
- window.open(window.external.InstallDir + 'help.html' + (what? '#' + what : ''),'help', 'toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=630px, height=600px, topmargin=10px, leftmargin=10px');
- }*/
-
- function logPageAccess()
- {
- var sLink = getPageLink();
-
- if ( sLink )
- external.CfgRegValueString('last_visited_page') = sLink;
- }
-
- function getPageLink()
- {
- var sPath = window.location + "";
- var arItems = sPath.split("/");
-
- if ( arItems.length > 1)
- return sValidPath = arItems[arItems.length-2] + "/" + arItems[arItems.length-1];
-
- return "";
- }
-
- function getLastVisitedPage()
- {
- return external.CfgRegValueString('last_visited_page');
- }
-
- function getProtocol( strConstProtocol, strProtNums )
- {
- if ( strConstProtocol == 'tcp' )
- return getStr('','STR_PROTOCOL_TCP');
- else if ( strConstProtocol == 'tcp_s' )
- return getStr('','STR_PROTOCOL_TCP_S');
- else if ( strConstProtocol == 'udp' )
- return getStr('','STR_PROTOCOL_UDP');
- else if ( strConstProtocol == 'tcp_udp' )
- return getStr('','STR_PROTOCOL_TCP_UDP');
- else if ( strConstProtocol == 'icmp' )
- return getStr('','STR_PROTOCOL_ICMP');
- else if ( strConstProtocol == 'other' )
- return getStr('','STR_PROTOCOL_OTHER') + (strProtNums? ' (' + strProtNums + ')' : '');
- else if ( strConstProtocol == 'ip' )
- return getStr('','STR_PROTOCOL_IP');
- else
- return strConstProtocol;
- }
-
- function getProtocolByID( eProtocol, strProtNums, eICMP )
- {
- if ( eProtocol == PROT_TCP )
- return getStr('','STR_PROTOCOL_TCP');
- else if ( eProtocol == PROT_TCP_S )
- return getStr('','STR_PROTOCOL_TCP_S');
- else if ( eProtocol == PROT_UDP )
- return getStr('','STR_PROTOCOL_UDP');
- else if ( eProtocol == PROT_TCP_UDP )
- return getStr('','STR_PROTOCOL_TCP_UDP');
- else if ( eProtocol == PROT_ICMP )
- return getStr('','STR_PROTOCOL_ICMP') + ( eICMP? ' (' + getICMPFncStr( eICMP ) + ')' : '');
- else if ( eProtocol == PROT_OTHER )
- return getStr('','STR_PROTOCOL_OTHER') + (strProtNums? ' (' + strProtNums + ')' : '');
- else if ( eProtocol == PROT_IP )
- return getStr('','STR_PROTOCOL_IP');
- else
- return eProtocol;
- }
-
- function getProtocolConst( eProt )
- {
- if ( eProt == PROT_TCP )
- return 'tcp';
- else if ( eProt == PROT_TCP_S )
- return 'tcp_s';
- else if ( eProt == PROT_UDP )
- return 'udp';
- else if ( eProt == PROT_TCP_UDP )
- return 'tcp_udp';
- else if ( eProt == PROT_ICMP )
- return 'icmp';
- else if ( eProt == PROT_IP )
- return 'ip';
- else if ( eProt == PROT_OTHER )
- return 'other';
- else
- return '*';
- }
-
- function getDirection( strConstDir )
- {
- if ( strConstDir == 'in' )
- return getStr('','STR_DIR_IN');
- else if ( strConstDir == 'out' )
- return getStr('','STR_DIR_OUT')
- else if ( strConstDir == 'in_out' )
- return getStr('','STR_DIR_IN_OUT')
- else
- return strConstDir;
- }
-
- function getDirectionConst( iDir )
- {
- if ( iDir == DIR_IN )
- return 'in';
- else if ( iDir == DIR_OUT )
- return 'out'
- else
- return 'in_out';
- }
-
- function getPort( strConstPort )
- {
- if ( !strConstPort || (strConstPort == 'Any') || (strConstPort == ''))
- return getStr('','STR_PORT_ANY');
- else
- return strConstPort;
- }
-
- function getICMPFncStr( eICMP )
- {
- if ( eICMP == ICMP_ECHO )
- return getStr('fw','STR_ICMP_ECHO');
- else if ( eICMP == ICMP_DEST_UNREACHABLE )
- return getStr('fw','STR_ICMP_DEST_UNREACHABLE');
- else if ( eICMP == ICMP_SRC_QUENCH )
- return getStr('fw','STR_ICMP_SRC_QUENCH');
- else if ( eICMP == ICMP_REDIRECT )
- return getStr('fw','STR_ICMP_REDIRECT');
- else if ( eICMP == ICMP_ROUTER )
- return getStr('fw','STR_ICMP_ROUTER');
- else if ( eICMP == ICMP_TIMEOUT )
- return getStr('fw','STR_ICMP_TIMEOUT');
- else if ( eICMP == ICMP_PARAM )
- return getStr('fw','STR_ICMP_PARAM');
- else if ( eICMP == ICMP_TIMESTAMP )
- return getStr('fw','STR_ICMP_TIMESTAMP');
- else if ( eICMP == ICMP_INFO )
- return getStr('fw','STR_ICMP_INFO');
- else if ( eICMP == ICMP_ADDRMASK )
- return getStr('fw','STR_ICMP_ADDRMASK');
- else if ( eICMP == ICMP_V6_DEST_UNREACHABLE )
- return getStr('fw','STR_ICMP_V6_DEST_UNREACHABLE');
- else if ( eICMP == ICMP_V6_PACKET_TOO_BIG )
- return getStr('fw','STR_ICMP_V6_PACKET_TOO_BIG');
- else if ( eICMP == ICMP_V6_TIMEOUT )
- return getStr('fw','STR_ICMP_V6_TIMEOUT');
- else if ( eICMP == ICMP_V6_PARAM )
- return getStr('fw','STR_ICMP_V6_PARAM');
- else if ( eICMP == ICMP_V6_ECHO )
- return getStr('fw','STR_ICMP_V6_ECHO');
- else if ( eICMP == ICMP_V6_MULTICAST )
- return getStr('fw','STR_ICMP_V6_MULTICAST');
- else if ( eICMP == ICMP_V6_MULTICAST_DONE )
- return getStr('fw','STR_ICMP_V6_MULTICAST_DONE');
- else if ( eICMP == ICMP_V6_ROUTER )
- return getStr('fw','STR_ICMP_V6_ROUTER');
- else if ( eICMP == ICMP_V6_NEIGHBOR )
- return getStr('fw','STR_ICMP_V6_NEIGHBOR');
- else if ( eICMP == ICMP_V6_REDIRECT )
- return getStr('fw','STR_ICMP_V6_REDIRECT');
- else
- return getStr('fw','STR_ICMP_ALL');
- }
-
- function getICMPFncCode( strICMP )
- {
- if ( strICMP == "ECHO_REQ_REPLY_8_0" )
- return ICMP_ECHO;
- else if ( strICMP == "DST_UNREACHABLE_3" )
- return ICMP_DEST_UNREACHABLE;
- else if ( strICMP == "SRC_QUENCH_4" )
- return ICMP_SRC_QUENCH;
- else if ( strICMP == "REDIRECT_5" )
- return ICMP_REDIRECT;
- else if ( strICMP == "ROUTER_ADVERTISMENT_9_10" )
- return ICMP_ROUTER;
- else if ( strICMP == "TIMEOUT_11" )
- return ICMP_TIMEOUT;
- else if ( strICMP == "PARAM_PROBLEM_12" )
- return ICMP_PARAM;
- else if ( strICMP == "TIMESTAMP_REQ_REPLY_13_14" )
- return ICMP_TIMESTAMP;
- else if ( strICMP == "INFO_REQ_REPLY_15_16" )
- return ICMP_INFO;
- else if ( strICMP == "ADDRMASK_REQ_REPLY_17_18" )
- return ICMP_ADDRMASK;
- else if ( strICMP == "V6_DST_UNREACHABLE_1" )
- return ICMP_V6_DEST_UNREACHABLE;
- else if ( strICMP == "V6_PACKET_TOO_BIG_2" )
- return ICMP_V6_PACKET_TOO_BIG;
- else if ( strICMP == "V6_TIME_EXCEEDED_3" )
- return ICMP_V6_TIMEOUT;
- else if ( strICMP == "V6_PARAM_PROBLEM_4" )
- return ICMP_V6_PARAM;
- else if ( strICMP == "V6_ECHO_REQ_REPLY_128_129" )
- return ICMP_V6_ECHO;
- else if ( strICMP == "V6_MULTICAST_LISTENER_130_131" )
- return ICMP_V6_MULTICAST;
- else if ( strICMP == "V6_MULTICAST_LISTENER_DONE_132" )
- return ICMP_V6_MULTICAST_DONE;
- else if ( strICMP == "V6_ROUTER_ADVERTISMENT_133_134" )
- return ICMP_V6_ROUTER;
- else if ( strICMP == "V6_NEIGHBOR_ADVERTISMENT_135_136" )
- return ICMP_V6_NEIGHBOR;
- else if ( strICMP == "V6_REDIRECT_137" )
- return ICMP_V6_REDIRECT;
- else
- return ICMP_ALL;
- }
-
- function showhide(helpspan)
- {
- var obj = getObj(helpspan).style;
- if (obj.display== 'none')
- obj.display = 'block';
- else
- obj.display = 'none';
- }
-
- //////////////////////////////////////////////////////////////////////////////////////
- // GetApplicationsComboHtmlString - creates the application selection combo (uses app-list.xsl)
- //
- // CHANGED (by MM)! Parameters strServerPath and strClientPath are used only for identification if server or client
- // database should be used.
- function GetApplicationsComboHtmlString( strCtrlID, strServerPath, bClientPath, bIncludeDlls, bNoGroups, bNoLabels,
- bSkipSysApps, bDivide, bDisplayByDesc, bShowInfo, strOnChange, strOnDeactivate, bAddNoChangeRow, strStyle, bNotAll )
- {
- // compose the parameters passed into XSLT
- var strXslParams = bNoGroups ? '&groups=0' : '&groups=1';
- strXslParams += bNoLabels ? '&labels=0' : '&labels=1';
- strXslParams += bSkipSysApps ? '&skipsysapps=1' : '&skipsysapps=0';
- strXslParams += bDivide ? '÷=1' : '÷=0';
- strXslParams += bDisplayByDesc ? '&field=desc' : '&field=id';
- strXslParams += bShowInfo ? '&info=1' : '&info=0';
-
- // add strings params
- strXslParams += '&str_opt_sel_app=' + getStr('','STR_OPT_SEL_APP');
- strXslParams += '&str_opt_sel_grp=' + getStr('','STR_OPT_SEL_GRP');
- strXslParams += '&str_opt_sel_grp_dll=' + getStr('','STR_OPT_SEL_GRP_DLL');
- strXslParams += '&str_opt_sel_dll=' + getStr('','STR_OPT_SEL_DLL');
-
- var strAppsHTML = '<select ' + (strStyle? strStyle : 'style="width: 400px"') + ' NAME="' + strCtrlID + '" ID="' + strCtrlID + '" ' + (strOnDeactivate?(' ondeactivate="'+ strOnDeactivate + '"'):'') + (strOnChange?(' onchange="' + strOnChange + '"'):'') + '>';
-
- if ( bAddNoChangeRow )
- strAppsHTML += '<option value="" selected>' + getStr('','STR_BTCH_NO_CHANGE') + '</option>';
-
- // to distinguish fast among label and group, a: resp. g: prefix is added to the option values (d: and h: for dlls)
-
- if (bIncludeDlls) // only in DLL Loading, dlls can be included in the combo
- {
- // * => all dlls
- if ( !bNotAll )
- strAppsHTML += '<option value="d:*">' + getStr('','STR_OPT_SEL_ALL_DLL') + '</option>';
-
- // client repository
- if (bClientPath) // && isCPVisible())
- {
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_USER_REP') + '</option>';
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, true, "../ws/app-list.xsl", strXslParams + "&mode=dlllist" );
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_COMMON_REP') + '</option>';
- }
-
- // server repository
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, false, "../ws/app-list.xsl", strXslParams + "&mode=dlllist");
-
- // * => all apps
- strAppsHTML += '<option value="a:*">' + getStr('','STR_OPT_SEL_ALL_APP') + '</option>';
-
- } else {
-
- // * => all apps
- if ( !bNotAll )
- strAppsHTML += '<option value="a:*">*</option>';
- }
-
- strXslParams += "&mode=applist";
-
- // client repository
- if (bClientPath) //&& isCPVisible())
- {
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_USER_REP') + '</option>';
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, true, "../ws/app-list.xsl", strXslParams );
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_COMMON_REP') + '</option>';
- }
-
- // $* => all system apps
- //strAppsHTML += '<option value="a:$*">$* (system)</option>';
-
- // server repository
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, false, "../ws/app-list.xsl", strXslParams + (isPersonalVersion()? "&removespec=1" : ""));
-
- strAppsHTML += '</select>';
-
- return strAppsHTML;
- }
-
- function GetApplicationsListHtmlString( strCtrlID, bClientPath, bIncludeDlls, bNoGroups, bNoLabels,
- bSkipSysApps, bDivide, bDisplayByDesc, bShowInfo, strOnChange, strOnDeactivate, strOnDblClick, bAddNoChangeRow, strStyle, bNotAll, iSize )
- {
- // compose the parameters passed into XSLT
- var strXslParams = bNoGroups ? '&groups=0' : '&groups=1';
- strXslParams += bNoLabels ? '&labels=0' : '&labels=1';
- strXslParams += bSkipSysApps ? '&skipsysapps=1' : '&skipsysapps=0';
- strXslParams += bDivide ? '÷=1' : '÷=0';
- strXslParams += bDisplayByDesc ? '&field=desc' : '&field=id';
- strXslParams += bShowInfo ? '&info=1' : '&info=0';
-
- // add strings params
- strXslParams += '&str_opt_sel_app=' + getStr('','STR_OPT_SEL_APP');
- strXslParams += '&str_opt_sel_grp=' + getStr('','STR_OPT_SEL_GRP');
- strXslParams += '&str_opt_sel_grp_dll=' + getStr('','STR_OPT_SEL_GRP_DLL');
- strXslParams += '&str_opt_sel_dll=' + getStr('','STR_OPT_SEL_DLL');
-
- var strAppsHTML = '<select ' + (strOnDblClick? 'ondblclick="' + strOnDblClick + '"' : '' ) + ' size="' + iSize + '" ' + (strStyle? strStyle : 'style="width: 400px"') + ' NAME="' + strCtrlID + '" ID="' + strCtrlID + '" ' + (strOnDeactivate?(' ondeactivate="'+ strOnDeactivate + '"'):'') + (strOnChange?(' onchange="' + strOnChange + '"'):'') + '>';
-
- if ( bAddNoChangeRow )
- strAppsHTML += '<option value="" selected>' + getStr('','STR_BTCH_NO_CHANGE') + '</option>';
-
- // to distinguish fast among label and group, a: resp. g: prefix is added to the option values (d: and h: for dlls)
-
- if (bIncludeDlls) // only in DLL Loading, dlls can be included in the combo
- {
- // * => all dlls
- if ( !bNotAll )
- strAppsHTML += '<option value="d:*">' + getStr('','STR_OPT_SEL_ALL_DLL') + '</option>';
-
- // client repository
- if (bClientPath)
- {
- //strAppsHTML += '<optgroup label="' + getStr('','STR_OPT_SEL_USER_REP') + '">';
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_USER_REP') + '</option>';
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, true, "../ws/app-list.xsl", strXslParams + "&mode=dlllist" );
- //strAppsHTML += '</optgroup>';
-
- //strAppsHTML += '<optgroup label="' + getStr('','STR_OPT_SEL_COMMON_REP') + '">';
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_COMMON_REP') + '</option>';
- }
-
- // server repository
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, false, "../ws/app-list.xsl", strXslParams + "&mode=dlllist");
-
- if (bClientPath)
- {
- //strAppsHTML += '</optgroup>';
- }
-
- // * => all apps
- strAppsHTML += '<option value="a:*">' + getStr('','STR_OPT_SEL_ALL_APP') + '</option>';
-
- } else {
-
- // * => all apps
- if ( !bNotAll )
- strAppsHTML += '<option value="a:*">*</option>';
- }
-
- strXslParams += "&mode=applist";
-
- // client repository
- if (bClientPath) //&& isCPVisible())
- {
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_USER_REP') + '</option>';
- //strAppsHTML += '<optgroup label="' + getStr('','STR_OPT_SEL_USER_REP') + '">';
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, true, "../ws/app-list.xsl", strXslParams );
- //strAppsHTML += '</optgroup>';
-
- //strAppsHTML += '<optgroup label="' + getStr('','STR_OPT_SEL_COMMON_REP') + '">';
- strAppsHTML += '<option value="" style="color: ' + COLOR_DB_ROW + ';">' + getStr('','STR_OPT_SEL_COMMON_REP') + '</option>';
- }
-
- // server repository
- strAppsHTML += transformXMLWithParamsEx( XM_APPREP, false, "../ws/app-list.xsl", strXslParams + (isPersonalVersion()? "&removespec=1" : ""));
-
- if (bClientPath)
- {
- //strAppsHTML += '</optgroup>';
- }
-
- strAppsHTML += '</select>';
-
- return strAppsHTML;
- }
-
-
- //========================== menu ====================================
- var hTimeout = 0;
- var sTimeoutCommand = "";
- var _m_lastMenuLayer = '';
- function popUpLayer(sLayerName,bShow, oParent)
- {
- if (bShow)
- {
- doTimeoutCommand();
-
- document.getElementById(sLayerName).style.top = (topmenu.offsetTop + topmenu.offsetHeight - 2) + "px";
- document.getElementById(sLayerName).style.left = (oParent.offsetLeft + 8 ) + "px";
-
- document.getElementById('_menu_tmp_frame').style.top = (topmenu.offsetTop + topmenu.offsetHeight - 2) + "px";
- document.getElementById('_menu_tmp_frame').style.left = (oParent.offsetLeft + 8 ) + "px";
- document.getElementById('_menu_tmp_frame').style.height = document.getElementById(sLayerName).offsetHeight + "px";
- document.getElementById('_menu_tmp_frame').style.width = document.getElementById(sLayerName).offsetWidth + "px";
-
- _m_lastMenuLayer = sLayerName;
- }
- else
- _m_lastMenuLayer = '';
-
- document.getElementById(sLayerName).style.visibility = (bShow? "visible" : "hidden");
- document.getElementById('_menu_tmp_frame').style.visibility = (bShow? "visible" : "hidden");
- }
-
- // Sets timer for floating menu hiding
- // @param sLayerName is name of the layer to hide
- function layerTimeOff(sLayerName)
- {
- sTimeoutCommand = "popUpLayer('" + sLayerName + "', false)";
- hTimeout = setTimeout(sTimeoutCommand, 200);
- }
-
- // Immediately performs timeout command
- function doTimeoutCommand()
- {
- if (sTimeoutCommand)
- {
- eval(sTimeoutCommand);
- clearTimeout(hTimeout);
- sTimeoutCommand = "";
- }
- }
-
- // Show menu
- function onMenuItemOver()
- {
- clearTimeout(hTimeout);
- }
-
- // Hide manu
- function onMenuItemOut(sLayerName)
- {
- layerTimeOff(sLayerName);
- }
-
- function addSubMenuItem( strText, strLink, strOnClick)
- {
- document.write('<a href="' + strLink + '" ' + (strOnClick? 'onclick="' + strOnClick + '"' : '') + '><span style="color: black">::</span>' + strText + '</a>')
- }
-
- function addTopMenuItem( strText, strSubMenuID, strOnClick, strLink)
- {
- document.write('<a ' + (strSubMenuID? 'onmouseout="layerTimeOff(\'' + strSubMenuID + '\'); return false;" onmouseover="popUpLayer(\'' + strSubMenuID + '\',true, this);"' : '') + ' href="' + (strLink? strLink : '#') + '" ' + (strLink? '' : 'onclick="' + ( strOnClick? strOnClick : '') + '"' ) + '>' + strText + '</a>')
- }
-
- function showOptionDialog()
- {
- // hide current menu
- if ( external.CfgRegValueString("design") == 'std_menu' )
- popUpLayer(_m_lastMenuLayer,false, null);
-
- var arParams = new Array();
-
- arParams[0] = external;
- arParams[1] = window;
-
- var sFeatures="dialogHeight: 445px; dialogWidth: 610px; help:no; status:no; resizable:no; center:yes;";
-
- window.showModalDialog( '../common/options.html', arParams, sFeatures );
- }
-
- function insertTopMenu()
- {
- var bADSupportInstalled = isUmxUTAInstalled();
-
- //alert( document.body.offsetWidth )
- //alert( document.body.scrollWidth )
- document.write('<style>')
- document.write('DIV#topmenu A, DIV#topmenu A:hover, DIV#topmenu A:visible {background-image: url(../img/arrow_orange.gif); background-position: -3px; background-repeat: no-repeat; text-decoration: none; color: #FAC114; font-weight: bold; border: 0px; padding: 2px 1px 2px 10px; margin: 1px 2px 1px 5px;}');
- document.write('DIV#topmenu A:hover {background-image: url(../img/arrow.gif); color: white;}');
- document.write('DIV#topmenu { font-size: 8pt; width: 100%; white-space: nowrap; margin-top: 0px; height: 18px; border: 0px; border-bottom: 2px solid #66ccff; padding-bottom: 1px; background-image: url(../img/menu_bg.gif); }');
-
- document.write('DIV.submenu { font-size: 8pt; position: absolute; visibility: hidden; z-index: 500; top: 97px; left: 200px; padding: 5px 3px 5px 3px; background: White; border: 1px solid #25478F; border-right-width: 2px; border-bottom-width: 2px; filter: Alpha(Opacity=90); }');
- document.write('DIV.submenu A{ display: block; font-weight: bold; color: #25478F; text-decoration: none; text-align: left; padding: 0px 5px 0px 5px; white-space: nowrap; border: 1px solid white; }');
- document.write('DIV.submenu A:hover { background-color: #DFEBFF; border: 1px solid #25478F; color: black;}');
- document.write('</style>')
-
- document.write('<iframe id="_menu_tmp_frame" style="visibility: hidden; position: absolute; filter: Alpha(Opacity=30);"></iframe>');
-
- document.write('<div style="z-index=-1; border-bottom: 2px solid #66ccff; position: absolute; left: 0px; top: 0px; margin-left: 0px; width: 13px; height: 18px; background-image: url(../img/menu_bg.gif);"></div>')
- document.write('<div style="z-index=-1; border-bottom: 2px solid #66ccff; position: absolute; left: 39px; top: 0px; margin-left: 0px; width: 100%; height: 18px; background-image: url(../img/menu_bg.gif);"></div>')
-
- document.write('<div id="topmenu">')
-
- if ( external.ServerParser(0x40) )
- addTopMenuItem( getStr('','STR_LMENU_APPLICATIONS'), '_appmenu');
-
- // firewall
- if ( external.ServerParser(2) )
- {
- if ( isServerOS() && !isManaged() && isProVersion() )
- {
- // normal rules
- addTopMenuItem( getStr('','STR_LMENU_LTRAFFIC'), '_fwmenu');
-
- // routed rules
- addTopMenuItem( getStr('','STR_LMENU_PASS_TROUGH'), '_fwmenu2');
- }
- else
- addTopMenuItem( getStr('','STR_LMENU_FW_PROT'), '_fwmenu');
-
- if ( isContentFilterVisible() )
- {
- if ( isProVersion() && !isManaged() )
- addTopMenuItem( getStr('','STR_LMENU_CONT_FILTER'), '_httpfiltermenu');
- }
- };
-
- // sandbox
- if ( external.ServerParser(1) )
- {
- addTopMenuItem( getStr('','STR_LMENU_WS_FILE_PROT'), '_filemenu');
-
- addTopMenuItem( getStr('','STR_LMENU_WS_PROT2'), '_sysmenu');
- //addTopMenuItem( getStr('','STR_LMENU_WS_PROT'), '_sysmenu');
- }
-
- // IDS/IPS
- if ( external.ServerParser(0x10) )
- addTopMenuItem( getStr('','STR_LMENU_IDS'), '_idsmenu');
-
- // setting
- addTopMenuItem( getStr('','STR_LMENU_SETTINGS'), '_setmenu');
-
- // reports
- addTopMenuItem( getStr('','STR_LMENU_REPORTS'), '', '', '../reports/logs.html' );
-
- // help
- addTopMenuItem( getStr('','STR_LMENU_HELP'), '', 'javascript:showhelp(true); return false;');
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_appmenu" onmouseout="onMenuItemOut(\'_appmenu\');" onmouseover="onMenuItemOver();">');
-
- addSubMenuItem( getStr('','STR_LMENU_APPLICATIONS_LEAF'), '../apprep/arn-list.html' )
- if ( external.ServerParser(1) )
- addSubMenuItem( getStr('','STR_LMENU_WS_APP_SPAWNCON'), '../ws/wsn-spawn-rules.html');
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_fwmenu" onmouseout="onMenuItemOut(\'_fwmenu\');" onmouseover="onMenuItemOver();">');
-
- // firewall
- if ( external.ServerParser(2) )
- {
- var iZones = 1;//FW_GetPropertyValue("ZoneMode");
- if ( isNaN(parseInt(iZones)) ) // property not defined
- iZones = ZM_LOCAL_CONTROL; // default value
-
- var bShowZonesCtrl = ( iZones == ZM_LOCAL_CONTROL);
-
- if ( isServerOS() && !isManaged() && isProVersion() )
- {
- // normal rules
- addSubMenuItem( getStr('','STR_LMENU_ENDPOINT'), '../firewall/fwn-rules-list-detail.html' )
-
- if ( bADSupportInstalled )
- {
- addSubMenuItem( getStr('','STR_LMENU_VPN_LAN_USERS'), '../firewall/fwn-vpn-rules-list-detail.html', 'external.CfgRegValueString(\'fwn-vpn-rules-list-detail.html_params\') = \'?mode=fwRulesListUser\';')
- //addSubMenuItem( getStr('','STR_LMENU_VPN_USERS'), '../firewall/fwn-vpn-rules-list-detail.html', 'external.CfgRegValueString(\'fwn-vpn-rules-list-detail.html_params\') = \'?mode=fwRulesListUser\';')
- //addSubMenuItem( getStr('','STR_LMENU_MY_NET_USERS'), '../firewall/fwn-vpn-rules-list-detail.html', 'external.CfgRegValueString(\'fwn-vpn-rules-list-detail.html_params\') = \'?mode=fwRulesListUserLAN\';')
- addSubMenuItem( getStr('','STR_LMENU_PROTOCOL_VIEW'), '../firewall/fwn-vpn-protocol-view.html', 'external.CfgRegValueString(\'fwn-vpn-protocol-view.html_params\') = \'?mode=normal\';' )
- }
- addSubMenuItem( getStr('','STR_LMENU_ZONE'), '../firewall/fwn-zones.html' )
- }
- else if ( isProVersion() && !isManaged() )
- {
- addSubMenuItem( getStr('','STR_LMENU_FW_LOCAL_RULES'), '../firewall/fwn-rules-list-detail.html' )
- addSubMenuItem( getStr('','STR_LMENU_FW_ROUTED_RULES'), '../firewall/fwn-vpn-rules-list-detail.html', 'external.CfgRegValueString(\'fwn-vpn-rules-list-detail.html_params\') = \'?mode=list\';')
- addSubMenuItem( getStr('','STR_LMENU_ZONE'), '../firewall/fwn-zones.html' )
- addSubMenuItem( getStr('','STR_LMENU_NAT_ICS'), '../firewall/fwn-nat-options.html' )
- addSubMenuItem( getStr('','STR_LMENU_PROTOCOLS'), '../firewall/fwn-transport.html' )
- addSubMenuItem( getStr('','STR_LMENU_PRE_IP'), '../firewall/fwn-ipaddr.html' )
- }
- else
- {
- addSubMenuItem( getStr('','STR_LMENU_NET_SEC_RULES'), '../firewall/fwn-rules-list-detail.html' )
-
- if ( bShowZonesCtrl || !isManaged() )
- addSubMenuItem( getStr('','STR_LMENU_ZONE'), '../firewall/fwn-zones.html' )
-
- addSubMenuItem( getStr('','STR_LMENU_PROTOCOLS'), '../firewall/fwn-transport.html' )
- addSubMenuItem( getStr('','STR_LMENU_PRE_IP'), '../firewall/fwn-ipaddr.html' )
- }
- };
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_fwmenu2" onmouseout="onMenuItemOut(\'_fwmenu2\');" onmouseover="onMenuItemOver();">');
-
- // firewall
- // routed rules
- addSubMenuItem( getStr('','STR_LMENU_ENDPOINT'), '../firewall/fwn-vpn-rules-list-detail.html', 'external.CfgRegValueString(\'fwn-vpn-rules-list-detail.html_params\') = \'?mode=list\';')
-
- if ( bADSupportInstalled )
- {
- addSubMenuItem( getStr('','STR_LMENU_VPN_USERS'), '../firewall/fwn-vpn-rules-list-detail.html','external.CfgRegValueString(\'fwn-vpn-rules-list-detail.html_params\') = \'?mode=userrulelist\';' )
- addSubMenuItem( getStr('','STR_LMENU_MY_NET_USERS'), '../firewall/fwn-vpn-rules-list-detail.html', 'external.CfgRegValueString(\'fwn-vpn-rules-list-detail.html_params\') = \'?mode=userrulelist_out\';' )
- addSubMenuItem( getStr('','STR_LMENU_PROTOCOL_VIEW'), '../firewall/fwn-vpn-protocol-view.html', 'external.CfgRegValueString(\'fwn-vpn-protocol-view.html_params\') = \'?mode=routed\';')
- }
- addSubMenuItem( getStr('','STR_LMENU_NAT_ICS'), '../firewall/fwn-nat-options.html' )
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_httpfiltermenu" onmouseout="onMenuItemOut(\'_httpfiltermenu\');" onmouseover="onMenuItemOver();">');
-
- addSubMenuItem(getStr('','STR_LMENU_EXPRULES'), '../httpfilter/hf-rules.html');
- addSubMenuItem(getStr('','STR_LMENU_PREDEF'), '../httpfilter/hf-objects-list.html');
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_setmenu" onmouseout="onMenuItemOut(\'_setmenu\');" onmouseover="onMenuItemOver();">');
-
- if ( external.ServerParser(2) && isServerOS() && isProVersion() && !isManaged() )
- {
- addSubMenuItem( getStr('','STR_LMENU_PROTOCOLS'), '../firewall/fwn-transport.html' )
- addSubMenuItem( getStr('','STR_LMENU_PRE_IP'), '../firewall/fwn-ipaddr.html' )
- }
-
- if ( external.ServerParser(2) || external.ServerParser(1) )
- addSubMenuItem( getStr('','STR_LMENU_TIME'), '../common/daytime.html' )
-
- addSubMenuItem( getStr('','STR_LMENU_BACKUP'), 'javascript:window.external.OpenBackupDlg(); location.reload();' )
- addSubMenuItem( getStr('','STR_LMENU_WS_OPTIONS'), '#', 'showOptionDialog(); return false;' )
-
- /* if ( external.ServerParser(2) && isServerOS() && bADSupportInstalled && isProVersion() && !isManaged() )
- addSubMenuItem( getStr('','STR_LMENU_AD_SETTING'), '../common/options_ad.html' )*/
-
- if ( isProVersion() )
- addSubMenuItem( getStr('','STR_LMENU_OPTIONS_TRACK'), '../common/options_track.html' )
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_idsmenu" onmouseout="onMenuItemOut(\'_idsmenu\');" onmouseover="onMenuItemOver();">');
-
- addSubMenuItem( getStr('','STR_LMENU_IDS_RULES'), '../ids/ids-rules.html' )
- addSubMenuItem( getStr('','STR_LMENU_IDS_IP'), '../ids/ids-ipaddr.html' )
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_filemenu" onmouseout="onMenuItemOut(\'_filemenu\');" onmouseover="onMenuItemOver();">');
-
-
- if ( !isManaged() )
- {
- if ( isProVersion() )
- {
- addSubMenuItem(getStr('','STR_LMENU_SIMPLERULES'), '../ws/wsn-files-rules-simple.html');
- }
- else
- {
- addSubMenuItem(getStr('','STR_LMENU_WS_FILE_PROT_HIDDEN'), '../ws/wsn-files-hidden.html');
- addSubMenuItem(getStr('','STR_LMENU_WS_FILE_PROT_RO'), '../ws/wsn-files-readonly.html');
- }
- }
-
- addSubMenuItem(getStr('','STR_LMENU_EXPRULES'), '../ws/wsn-files-rules.html');
-
- document.write('</div>')
-
- document.write('<div class="submenu" id="_sysmenu" onmouseout="onMenuItemOut(\'_sysmenu\');" onmouseover="onMenuItemOver();">');
-
- addSubMenuItem(getStr('','STR_LMENU_WS_REG'), '../ws/wsn-registry-rules.html');
- if ( !is64bitOS() )
- addSubMenuItem(getStr('','STR_LMENU_WS_DLL_LOAD'), '../ws/wsn-spawndll-rules.html');
- addSubMenuItem(getStr('','STR_LMENU_WS_OLE_COM_CTRL'), '../ws/wsn-olecom-rules.html');
- addSubMenuItem(getStr('','STR_LMENU_WS_SERVICES_CTRL'), '../ws/wsn-services-rules.html');
- addSubMenuItem(getStr('','STR_LMENU_WS_DEV_CTRL'), '../ws/wsn-devices.html');
- addSubMenuItem(getStr('','STR_LMENU_WS_SYS_PRIV'), '../ws/wsn-syspriv-rules.html');
- addSubMenuItem(getStr('','STR_LMENU_WS_EXCEPTIONS'), '../ws/wsn-except-rules.html');
-
- document.write('</div>')
- }
-
- function insertStyleFiles()
- {
- document.write('<link href="../common/styl.css" rel="stylesheet" type="text/css">');
- if ( external.CfgRegValueString("design") == 'bt_menu')
- {
- document.write('<link href="../layout-bt/styl.css" rel="stylesheet" type="text/css">');
- }
- }
-
- function processMsgOKNotShow(strRegKey, strText, strNotShowText, strTitle)
- {
- var strValue = external.CfgRegValueString( strRegKey );
-
- if ( strValue == 'not_show')
- return;
-
- var arParams = new Array();
-
- arParams[0] = external;
- arParams[1] = strText;
- arParams[2] = strNotShowText;
- arParams[3] = strTitle;
-
- var sFeatures="dialogHeight: 200px; dialogWidth: 370px; help:no; status:no; resizable:no; center:yes;";
-
- var arRetVal = window.showModalDialog( '../common/msgbox.html', arParams, sFeatures );
-
- if ( arRetVal && arRetVal[0] )
- {
- external.CfgRegValueString( strRegKey ) = 'not_show';
- }
- }
-
- ////////////////////////// Table header //////////////////////
-
- /*
- iCorrection - is needed when table has not collapsed border. Then
- is there space between cells (usual 2px).
- */
- function initTblHeader( strHdrWrapperID, strRulesID, iCorrection)
- {
- if ( !iCorrection )
- iCorrection = 0;
-
- var oDivContainer = getObj(strHdrWrapperID);
- var oData = getObj(strRulesID);
- if ( !oData ) // table not found
- return;
-
- var oDataRow = oData.rows[0];
- var oDataRowLast = null;
-
- // get last not empty row
- for (var i = oData.rows.length - 1; i >= 0; i-- )
- {
- if ( oData.rows[i].cells.length == oDataRow.cells.length )
- {
- oDataRowLast = oData.rows[i];
- break;
- }
- }
-
- // for sure
- if ( !oDataRowLast )
- return;
-
- // remove current table header
- while ( oDivContainer.childNodes.length > 0 )
- oDivContainer.removeChild( oDivContainer.childNodes[0] );
-
- for (var i = 0; i < oDataRow.cells.length; i++ )
- {
- var oDataCell = oDataRow.cells[i];
- var oDataCellLast = oDataRowLast.cells[i];
-
- oDiv = document.createElement('DIV')
- oDiv.innerHTML = oDataCell.innerHTML;
-
- if ( i == 0)
- oDiv.style.width = (oDataCellLast.offsetWidth + 1 + iCorrection) + "px";
- else if ( i == oDataRow.cells.length - 1)
- oDiv.style.width = (oDataCellLast.offsetWidth + 20 + iCorrection) + "px";
- else
- oDiv.style.width = (oDataCellLast.offsetWidth + iCorrection) + "px";
-
- oDivContainer.appendChild( oDiv);
- }
-
- oData.style.marginTop = '-' + (oDataRow.offsetHeight + 1) + 'px';
- }
-
- function scrollTblHeader(strHdrWrapperID, strRulesWrapperID)
- {
- var oDiv = getObj(strRulesWrapperID);
- var oDivContainer = getObj(strHdrWrapperID);
-
- oDivContainer.scrollLeft = oDiv.scrollLeft;
- }
-
- // autofit dialog height
- var _posCorrLeft = 0;
- var _posCorrTop = 0;
-
- function _autofitDialogSize(bWidth, bHeight)
- {
- if ( !_posCorrLeft )
- _posCorrLeft = window.screenLeft - parseInt(window.dialogLeft);
-
- if ( !_posCorrTop )
- _posCorrTop = window.screenTop - parseInt(window.dialogTop);
-
- var leftPos = window.screenLeft;
- var topPos = window.screenTop;
-
- window.dialogLeft = leftPos - _posCorrLeft;
- window.dialogTop = topPos - _posCorrTop;
-
- if ( bHeight )
- window.dialogHeight = (document.body.scrollHeight + parseInt(window.dialogHeight) - parseInt(document.body.offsetHeight)) + "px";
- }
-
- function getAccessImg( eAccess )
- {
- if ( eAccess == AR_PREVENT )
- return '<img src="../img/prevent.gif" width="16" height="16" title="' + getStr('','STR_ACCESS_PREVENT') + '">';
- else if ( eAccess == AR_ASKUSER )
- return '<img src="../img/askuser.gif" width="16" height="16" title="' + getStr('','STR_ACCESS_ASK') + '">';
- else
- return '<img src="../img/allow.gif" width="16" height="16" title="' + getStr('','STR_ACCESS_ALLOW') + '">';
- }
-
- function getAuditImg( eAudit )
- {
- if ( eAudit == AL_MONITOR )
- return '<img src="../img/monitor.gif" width="16" height="16" title="' + getStr('','STR_AUDIT_MONITOR') + '">';
- else if ( eAudit == AL_ALERT )
- return '<img src="../img/alert.gif" width="16" height="16" title="' + getStr('','STR_AUDIT_ALERT') + '">';
- else
- return '<img src="../img/ignore.gif" width="16" height="16" title="' + getStr('','STR_AUDIT_IGNORE') + '">';
- }
-
- function getAccessImgByStr( strAccess )
- {
- if ( strAccess == 'Prevent' )
- return '<img src="../img/prevent.gif" width="16" height="16" title="' + getStr('','STR_ACCESS_PREVENT') + '">';
- else if ( strAccess == 'AskUser' )
- return '<img src="../img/askuser.gif" width="16" height="16" title="' + getStr('','STR_ACCESS_ASK') + '">';
- else
- return '<img src="../img/allow.gif" width="16" height="16" title="' + getStr('','STR_ACCESS_ALLOW') + '">';
- }
-
- function getAuditImgByStr( strAudit )
- {
- if ( strAudit == 'Monitor' )
- return '<img src="../img/monitor.gif" width="16" height="16" title="' + getStr('','STR_AUDIT_MONITOR') + '">';
- else if ( strAudit == 'Alert' )
- return '<img src="../img/alert.gif" width="16" height="16" title="' + getStr('','STR_AUDIT_ALERT') + '">';
- else
- return '<img src="../img/ignore.gif" width="16" height="16" title="' + getStr('','STR_AUDIT_IGNORE') + '">';
- }
-